gh-150831: clarify generator, generator function, and generator iterator in glossary#150905
gh-150831: clarify generator, generator function, and generator iterator in glossary#150905Aniketsy wants to merge 4 commits into
Conversation
Documentation build overview
7 files changed ·
|
|
I would love to move the glossary closer to actual usage. I have never heard someone say "generator iterator": it's redundant. Can we explicitly mention that "generator" is used informally for both meanings and that "generator function" and "generator iterator" are formal terms that are uncommon? |
hmm , i think its good to mention like this. thanks for the improvement 😊 |
| Generator iterators also implement the :meth:`~generator.send` method | ||
| to send a value into the suspended generator, and the | ||
| :meth:`~generator.throw` method to raise an exception at the point | ||
| where the generator was paused. See :pep:`342`. |
There was a problem hiding this comment.
Let's find a reference in the docs to explain this instead of a PEP.
There was a problem hiding this comment.
thanks for the reference 😊 .
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
fixes #150831
…sary